import {request,uploadRequest} from '../http.js'

// 上传图片
export const upload = (data)=>{
	return uploadRequest({
		url:'/api/common/upload',
		method:'POST',
		data
	})
}

// 获取首页导航
export const getNav = (data)=>{
	return request({
		url:'/api/index/getNav',
		method:'POST',
		data
	})
}
// 获取首页广告
export const getAds = (data)=>{
	return request({
		url:'/api/index/getAds',
		method:'POST',
		data
	})
}

// 首页模块 /api/index/indexModule
export const indexModule = (data)=>{
	return request({
		url:'/api/index/indexModule',
		method:'POST',
		data
	})
}


// 城市列表
export const cities = (data)=>{
	return request({
		url:'/api/service/user/cities',
		method:'POST',
		data
	})
}

// 获取位置
export const getlocation = (data)=>{
	return request({
		url:'/api/service/user/getlocation',
		method:'POST',
		data
	})
}

// 发送验证码 /api/sms/send
export const sendCode = (data)=>{
	return request({
		url:'/api/sms/send',
		method:'POST',
		data
	})
}


// 课程 我的优惠券列表
export const coupon_lists = (data)=>{
	return request({
		url:'/api/xiluedu.user/coupon_lists',
		method:'POST',
		data
	})
}

// 热门搜索 
export const rmSearch = (data)=>{
	return request({
		url:'/api/index/rmSearch',
		method:'POST',
		data
	})
}